<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        nav{
            display: flex;
            justify-content: center;     /* 水平居中 */
            align-items: center;
            background-color: lightblue;/* 垂直居中 */
            height: 100vh;
            gap: 20px;
        }
        a{
            width: 50px;
            background-color: #0056b3;
        }
    </style>
</head>
<body >
<nav>
    <a href="#" style="display: inline-block">首页</a>
    <a href="#">你好</a>
    <a href="#">狗蛋</a>
    <a href="#">二货</a>
</nav>
</body>
</html>